#ifndef __RENDER_H__
#define __RENDER_H__

#include <vector>

#include <QGLWidget>

#include "vector.h"
#include "edge.h"

namespace Ui {

class Render : public QGLWidget {
Q_OBJECT
public:
	Render(QWidget* _parent = 0);	
	~Render(void);

	QSize minimumSizeHint(void) const;
	QSize sizeHint(void) const;

	void set_points(std::vector<Tut::Vector> _points);
	void set_triangulation(std::vector<Tut::Edge> _triangulation);
	void clear_points(void);
	void clear_triangulation(void);

	void set_points_visualization(bool option);
	void set_triangulation_visualization(bool option);
	void set_viewport_scale(int scale);

protected:
	void initializeGL(void);
	void paintGL(void);
	void resizeGL(int width, int height);
private:
	std::vector<Tut::Edge> triangulation;
	std::vector<Tut::Vector> points;
	bool triangulation_visualization;
	bool points_visualization;
	int viewport_scale;
	GLuint triangulation_object;
};

}
 
#endif

